package starcoast.bocai.com.starcoast.activitys.work;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.ListView;

import butterknife.Bind;
import butterknife.ButterKnife;
import starcoast.bocai.com.starcoast.R;
import starcoast.bocai.com.starcoast.activitys.SearchActivity;
import starcoast.bocai.com.starcoast.adapter.LegalAdapter;
import starcoast.bocai.com.starcoast.common.BaseActivity;

/**
 * Created by admin on 2016/6/14.
 */
public class LegalActivity extends BaseActivity {
    @Bind(R.id.legal_lv)
    ListView legal_lv;
    @Bind(R.id.toolbar)
    Toolbar toolbar;
    LegalAdapter adapter;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_legal);
        ButterKnife.bind(this);
        initview();

    }
    public void initview(){
        initToolbar("法律援助");
        initToolBack();
        toolbar.inflateMenu(R.menu.menu_add);
        adapter = new LegalAdapter(this);
        legal_lv.setAdapter(adapter);
        toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                startActivity(new Intent(LegalActivity.this, LegalHelpActivity.class));
                return false;
            }
        });
    }
}
